#include<head.h>

typedef struct stu
{
    int id;
    int age;
    char name[20];
}stu;


void* fun(void* stu_1)
{
    stu * s1 = (stu*)stu_1;
    printf("id = %d, age = %d, name = %s\n", s1->id, s1->age, s1->name);
}

int main(int argc, char const *argv[])
{
    stu s1 = {1, 20, "zhangsan"};

    pthread_t tid = 0;
    
    pthread_create(&tid, NULL, fun, (void *)&s1);//创建线程

    pthread_join(tid, NULL);//等待线程结束
    return 0;
}
